function funcDecorator(target, name, descriptor) {
  // descriptor.value // f onClick()
  console.log(name) // 'onClick' 'onOther'
  let originalMethod = descriptor.value
  descriptor.value = function () {
    console.log('修改后的逻辑')
    console.log('this', this, 'arguments', arguments)
    return originalMethod.apply(this, arguments)
  }
  console.log('descriptor', descriptor)
  return descriptor
}

class Button {
  @funcDecorator
  onClick() {
    console.log('原有的逻辑')
  }
  @funcDecorator
  onOther() {}
}

const button = new Button()
button.onClick()
